package dao;

import com.dao.StudentMapper;
import com.dao.TeacherMapper;
import com.pojo.Student;
import com.pojo.Teacher;
import com.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class MyTeat {
    @Test
    public void test(){
        SqlSession sqlSession =MybatisUtils.getSqlSession();

        TeacherMapper teacherMapper = sqlSession.getMapper(TeacherMapper.class);
        Teacher teacher = teacherMapper.getTeacher(1);
        System.out.println(teacher);
        sqlSession.close();

        //for(Teacher teacher :sqlSession.getMapper(TeacherMapper.class).getTeacher()){
            //System.out.println(teacher);
        //}
    }
}
